#include "inheritancenode.h"

void InheritanceNode::write(GraphStream * s)
{
	this->accept(s);
	fprintf(s->stream,"\tnode_%d [label=\"(%d,%d)\\nConformant inheritance\" shape=\"rectangle\"]\n",this->number(),this->line(),this->position());
	this->m_classname->write(s);
	fprintf(s->stream,"\tnode_%d -> node_%d [label=\"from\"]\n",this->number(),m_classname->number());
	if (m_undefines)
	{
		this->m_undefines->write(s);
		fprintf(s->stream,"\tnode_%d -> node_%d [label=\"undefines\"]\n",this->number(),m_undefines->number());	
	}
	if (m_redefines)
	{
		this->m_redefines->write(s);
		fprintf(s->stream,"\tnode_%d -> node_%d [label=\"redefines\"]\n",this->number(),m_redefines->number());	
	}
	if (m_renames)
	{
		this->m_renames->write(s);
		fprintf(s->stream,"\tnode_%d -> node_%d [label=\"renames\"]\n",this->number(),m_renames->number());	
	}
	if (m_selects)
	{
		this->m_selects->write(s);
		fprintf(s->stream,"\tnode_%d -> node_%d [label=\"select\"]\n",this->number(),m_selects->number());	
	}
}